<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-tiles"
	prefix="tiles"%>

<rich:panel header="#{messages['rci.split.week.maintenance.menu']}">
	<h:panelGrid>
		<h:outputText value="#{errorBean.errorMessage}" styleClass="error"></h:outputText>
	</h:panelGrid>
	
	<h:panelGrid width="100%">
	    <h:outputText value="#{messages['rci.split.week']}" styleClass="sub_header" />
	</h:panelGrid>
	
	<h:panelGrid width="100%" columns="1">
	    <h:panelGroup>
			<rich:dataTable id="data" var="rciSplitWeek" value="#{adminRCIBean.rciSplitWeekConfigList}" rows="20" width="99%">
				<rich:column style="text-align:center;width:5%;" >
					<f:facet name="header">
						<h:selectBooleanCheckbox id="chkAll" onclick="checkAll(this.form,this)" ></h:selectBooleanCheckbox>
					</f:facet>
					<h:selectBooleanCheckbox id="chk" value="#{rciSplitWeek.markAsSelect}"></h:selectBooleanCheckbox>
				</rich:column>
				
				<rich:column style="text-align:center;width:40%;">
					<f:facet name="header">
						<h:outputText value="#{messages['rci.split.week.desc']}"></h:outputText>
					</f:facet>
				
					<h:commandLink action="#{adminRCIBean.navUpdateRCISplitWeekConfigAction}" actionListener="#{adminRCIBean.navUpdateRCISplitWeekConfigActionListener}">
						<h:outputText value="#{rciSplitWeek.rciSplitWeekDesc}"></h:outputText>
					</h:commandLink>
					<f:param id="rciSplitWeekConfigId" value="#{rciSplitWeek.rciSplitWeekConfigId}" />
				</rich:column>	
			
				<rich:column style="text-align:center;width:10%;">
					<f:facet name="header">
						<h:outputText value="#{messages['no.of.night']}"></h:outputText>
					</f:facet>
				
					<h:outputText value="#{rciSplitWeek.noOfNight}"></h:outputText>
				</rich:column>	
				
				<rich:column style="text-align:center;width:15%;">
					<f:facet name="header">
						<h:outputText value="#{messages['check.in.day']}"></h:outputText>
					</f:facet>
				
					<h:outputText value="#{rciSplitWeek.checkInDayName}"></h:outputText>
				</rich:column>

				<rich:column style="text-align:center;width:15%;">
					<f:facet name="header">
						<h:outputText value="#{messages['check.out.day']}"></h:outputText>
					</f:facet>
				
					<h:outputText value="#{rciSplitWeek.checkOutDayName}"></h:outputText>
				</rich:column>
			</rich:dataTable>
		</h:panelGroup>
		
		<rich:datascroller align="left"  for="data" maxPages="20" />
		
		<t:panelGrid columns="2" columnClasses="standardTable_ColumnLeft_20,standardTable_ColumnLeft_80" width="100%">
			<h:outputText></h:outputText>
			<h:panelGrid columns="2">
				<h:commandButton value="#{messages['add.split.week']}" action="#{adminRCIBean.navAddRCISplitWeekConfigAction}" 
					actionListener="#{adminRCIBean.navAddRCISplitWeekConfigActionListener}" styleClass="button">
				</h:commandButton>
				
				<h:commandButton value="#{messages['remove.split.week']}" action="#{adminRCIBean.deleteRCISplitWeekConfigAction}" 
					actionListener="#{adminRCIBean.deleteRCISplitWeekConfigActionListener}" onclick="#{messages['delete.msg.alert']}" styleClass="button">
				</h:commandButton>
			</h:panelGrid>
		</t:panelGrid>
	</h:panelGrid>
	
</rich:panel>	